import http from '../index'

export const create = (data) => http({
    url: '/api/jdcpg/yw/create',
    method: 'post',
    data
})

export const selectAll = (params) => http({
    url: '/api/jdcpg/yw/selectAll?'+params,
    method: 'get',
})

export const selectsearch = (params) => http({
    url: '/api/jdcpg/yw/search?'+params,
    method: 'get',
})
export const selectById = (params) => http({
    url: '/api/jdcpg/yw/selectById?'+params,
    method: 'get',
})

export const saveJcxx = (data) => http({
    url: '/api/jdcpg/yw/saveJcxx',
    method: 'post',
    data
})

export const saveZyxx = (data) => http({
    url: '/api/jdcpg/yw/saveZyxx',
    method: 'post',
    data
})

export const saveSsqd = (data) => http({
    url: '/api/jdcpg/yw/saveSsqd',
    method: 'post',
    data
})
export const saveCzqd = (data) => http({
    url: '/api/jdcpg/yw/saveCzqd',
    method: 'post',
    data
})
export const saveYx = (params,data) => http({
    url: '/api/jdcpg/yw/saveYx?'+params,
    method: 'post',
    data
})
export const deleteYx = (params) => http({
    url: '/api/jdcpg/yw/deleteYx?'+params,
    method: 'get'
})
export const deleteYxs = (data) => http({
    url: '/api/jdcpg/yw/deleteYxs',
    method: 'post',
    data
})
export const updateFilename = (data) => http({
    url: '/api/jdcpg/yw/updateFilename',
    method: 'post',
    data
})

export const submit = (params) => http({
    url: '/api/jdcpg/yw/submit?'+params,
    method: 'get',
})

export const sqzf = (data) => http({
    url: '/api/jdcpg/yw/sqzf',
    method: 'post',
    data
})

export const zf = (params) => http({
    url: '/api/jdcpg/yw/zf?'+params,
    method: 'get'
})

export const audit = (data) => http({
    url: '/api/jdcpg/yw/audit',
    method: 'post',
    data
})

//上传行驶证
export const xszUpload = (data) => http({
    url: '/api/xszsb/xszUpload',
    method: 'post',
    data
})
//上传登记证
export const djzUpload = (data) => http({
    url: '/api/xszsb/djzUpload',
    method: 'post',
    data
})

//图片批量下载
export const imgDownload = (data) => http({
    url: '/api/jdcpg/yw/picturesBatchDownload',
    method: 'post',
    responseType: 'blob',
    data
})

//
export const getShy = () => http({
    url: '/api/jdcpg/yw/getShy',
    method: 'get'
})

//token
export const getAccessToken = () => http({
    url: '/api/xszsb/getAccessToken',
    method: 'get'
})

// ywztCode
export const getYwztCode = (params) => http({
  url: '/api/jdcpg/yw/getYwztCode?' + params,
  method: 'get'
})

//getYwlog
export const getYwlog = (params) => http({
  url: '/api/jdcpg/yw/getYwlog?' + params,
  method: "get"
})

// 更改照片每行数量
export const updateYxcol = (params) => http({
  url: '/api/jdcpg/yw/updateYxcol?' + params,
  method: "get"
})

// 作业信息标签显示
export const updateZyxxShow = (params) => http({
  url: '/api/jdcpg/yw/updateZyxxShow?' + params,
  method: "get"
})

